# 定义一个简单的模型用于表示用户
from datetime import timedelta
from typing import Union

from pydantic import BaseModel


class User(BaseModel):
    user_id: int
    nick_name: str
    js_code: str
    open_id: str
    invite_code: str
    iat: int
    exp: Union[int, None] = None


class WxLoginRequest(BaseModel):
    js_code: str
    invite_code: Union[str, None] = None
    nick_name: Union[str, None] = None
    avatar: Union[str, None] = None


class WxLoginResponse(BaseModel):
    token: str
    authorization: str
    expires_in: Union[int, None] = None
    invite_code: str = None


class WxLogin:
    pass
